/*
Authors: Eli Yucht 300388949 and Lior Fass 300069705
Project: Hamming
Description: Main Class of the Receiver side
*/

#ifndef RECEIVER_H
#define RECEIVER_H

#define _CRT_SECURE_NO_WARNINGS

#define NUM_OF_ARGS 3

#include <iostream>
#include "socket_tools.h"
#include "Bytes_Manipulation.h"
#include "Hamming_EDM.h"

using namespace std;

// receiver class declaration
class Receiver
{
public:
	Receiver();
	int Init(int argc, char *argv[]);
	int Run();
	~Receiver();

private:
	FILE * file_p;
	SOCKET rcvr_socket;
	int nRecivedBytes, nReconstructedBytes, nErrors;
	int Check_Arguments(int argc, char *argv[]);
	int Receive_Decode_WriteFile();
	int PrintAndSendResult();
};

#endif //RECEIVER_H